public class StringDemo {
    public static void main(String[] args) {
        String str="qweRtyU,ioPasdfgHjK,l145698ncj,sNjDcns";
        String str1="abc";
        String str2="acb";
        System.out.println(str1.compareTo(str2));
        char[] chars={'I',' ','L','o','v','e',' ','Y','o','u'};
        System.out.println(str.charAt(1));
        System.out.println(String.copyValueOf(chars));
        System.out.println(str.hashCode());
        System.out.println(str.indexOf(97));
        System.out.println(str.isEmpty());
        System.out.println(str.length());
        System.out.println(str.replace('j','b'));
        String[] string=str.split(",");
        for (String strs:string) {
            System.out.println(strs);
        }
        System.out.println("---------");
        System.out.println(str.replaceAll(",","s"));
        System.out.println(str.substring(str.indexOf("a")));

        //截取：左闭右开范围
        System.out.println(str.substring(str.indexOf("a"),25));

        //大写小写
        System.out.println(str.toLowerCase());
        System.out.println(str.toUpperCase());

        System.out.println(String.valueOf(chars));
    }
}
